
import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
  Image,
  TouchableOpacity,
} from 'react-native';
var Dimensions = require('Dimensions');
var {height,width} = Dimensions.get('window');
export default class CommonView extends Component {
  render() {
    return (
      <TouchableOpacity activeOpacity={0.5}>
      <View style={styles.container}>
        <View>
          <Text style={[{color:this.props.titleColor},styles.titleStyle]}>{this.props.title}</Text>
          <Text style={styles.subTitleStyle}>{this.props.subTitle}</Text>
        </View>
        <Image source={{uri:this.props.rightImage}} style={{width:64,height:43,resizeMode:'contain'}}/>
      </View>
      </TouchableOpacity>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    backgroundColor: 'white',
    width:width/2-1,
    height:59,
    flexDirection:'row',
    justifyContent:'space-around',
    alignItems:'center',
    marginBottom:1,
    marginRight:1,
  },
  titleStyle:{
    fontSize:18,
    fontWeight:'bold',
  },
  subTitleStyle:{
    color:'gray',
  }
});
